<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@include file="/WEB-INF/page/share/taglib.jsp" %>
<table>
	<c:if test="${empty sessionScope.user}">
		<tr>
			<form action="" method="post">
				<td>用户名:&nbsp;<input type="text" name="username" />&nbsp;&nbsp;&nbsp;&nbsp;密码:&nbsp;<input type="password" name="password" /></td>
				<td><input type="button" name="btn" value="登录" onclick="javascript:"/></td>
			</form>
		</tr>
	</c:if>
	
	<c:if test="${fn:length(pageView.records)>0}">
	<c:forEach items="${pageView.records}" var="comment">
	<tr>
		<td>${comment.createDate }</td>
		<td>${sessionScope.user.username }</td>
	</tr>
	<tr>
		<td colspan="2">${comment.commentContent }</td>
	</tr>
	</c:forEach>
	</c:if>
	<c:if test="${fn:length(pageView.records)<=0}">
		<tr><td>当前没有评论!</td></tr>
	</c:if>
	<c:if test="${!empty sessionScope.user}">
		<tr>
			<td>
				<form action = "/shop/buyer/comment/manage.do?method=add" method="post">
				<textarea rows="20" cols="30" name="commentContent">
				</textarea>
				<br/>
				<input type="submit" value="提交"/>
				</form>
			</td>
		</tr>
	</c:if>
</table>